chore: update optimizer_runs to reduce contract size#194
Merged
Conversation
chore: update optimizer_runs to reduce contract size
Contributor
Author
|
That said, I´m not sure what the "optimal" amount of runs is here, if we want to publish the updated PDP contract on Mainnet |
wjmelements
reviewed
Sep 11, 2025
Contributor
For Ethereum, optimizer runs is how many times the code is expected to run. There are tradeoffs the optimizer can make for size vs execution. I have noticed that, on Filecoin, a smaller contract seems to also use less gas during execution, which isn't true in the normal EVM. I have a draft to profile gas on FEVM but I haven't had bandwidth to complete that for the last several weeks. If that work were complete we could tune this parameter to optimize for FEVM gas. |
chore: update optimizer_runs to 1
wjmelements
approved these changes
Sep 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the current settings, the PDP contract is above the size limit:
Reducing the
optimizer_runsto 200 makes it pass: